<?php echo $header ?>
<?php //echo $slider ?>
<?php echo $googlemap; ?>

<div class="content">
    <div class="container">
        <div class="row">
            <div class="span8">
                <?php
                foreach ($blogs as $blog) {
                    $mainPhoto = base_url() . "uploads/" . $blog->photo;
                    $thumbPhoto = base_url() . "uploads/thumbs/" . $blog->photo;
                    ?>
                    <div class="row">
                        <div class="span8 home-tab-main">
                            <div class="row">
                                <div class="span8">
                                    <h4><strong><a href="<?php echo site_url() . "singleb/" . $blog->id; ?>"><?php echo $blog->title ?></a></strong></h4>
                                </div>
                            </div>
                            <div class="row">
                                <div class="span2">
                                    <a class="thumbnail" href="<?php echo site_url() . "singleb/" . $blog->id; ?>">
                                        <img src="<?php echo (@getimagesize($mainPhoto)) ? $thumbPhoto : base_url() . "assets/theme/images/default.png" ?>"  alt=""/></a>
                                </div>
                                <div class="span6">      
                                    <p>
                                        <?php echo substr(strip_tags($blog->content), 0, 210) ?>
                                    </p>
                                    <p><a href="<?php echo site_url() . "singleb/" . $blog->id; ?>" class="btn"><?php echo lang('bp_read_more') ?></a></p>
                                </div>
                            </div>
                            <div class="row">
                                <div class="span8">
                                    <p></p>
                                    <p>
                                    <i class="icon-calendar"></i> <?php echo date("d F Y", strtotime($blog->addedDate)) ?> | 
                                    <i class="icon-tags"></i> <?php echo lang('bp_tags') ?> : 
                                    <?php
                                    $tags = explode(",", $blog->tags);
                                    foreach ($tags as $tag) {
                                        ?>                                
                                        <span class="label label-info"><?php echo $tag ?></span>
                                    <?php } ?>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div> <!-- Blog Row Finally -->
                <?php } ?>

                <?php echo $pagination; ?>
            </div>

            <div class="sidebar">
                <div class="span4 well ptwitter">
                    <h4>Twitter</h4>
                    <hr/>
                    <div class="row twitter-list">
                        <script>getTwitter('<?php echo $contact['twitter'] ?>', 5);</script>
                    </div>
                </div>
                <div class="span4 well ptwitter">
                    <h4>Facebook</h4>
                    <hr/>
                    <div class="row">
                        <div class="span4">
                            <iframe src="//www.facebook.com/plugins/likebox.php?href=<?php echo urlencode($contact['facebook']) ?>&amp;width=300&amp;height=258&amp;colorscheme=light&amp;show_faces=true&amp;header=false&amp;stream=false&amp;show_border=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:258px;" allowTransparency="true"></iframe>
                        </div>
                    </div>
                </div>
            </div><!-- End Sidebar--->

        </div><!-- End Row--->

    </div>
</div>


<?php echo $footer ?>